package com.haier.cloudremote.util;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.haier.cloudremote.common.SLog;

public class RunLog {
	public void createLogCollector() {  
        String logFileName = "cloudremote.log";// 日志文件名称  
        List<String> commandList = new ArrayList<String>();  
        commandList.add("logcat");  

        commandList.add("-f");  
        commandList.add("/data/tmp/"+logFileName);  
        commandList.add("-v");  
        commandList.add("time");  
  
        // 过滤指定TAG的信息  
         commandList.add("liudz:V");  
         commandList.add("*:S");  
        try {  
            Runtime.getRuntime().exec(
                    commandList.toArray(new String[commandList.size()]));  
        } catch (IOException e) {  
        	SLog.e("liudz", "RunLog--------" + e.toString());
        }  
    }
}
